<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!--文章头部-->
<div th:replace="header::header(null,null)"/>
<body>
<div class="am-g am-g-fixed blog-fixed index-page">
    <div class="am-u-md-8 am-u-sm-12">
        <!--列表-->
        <div th:each="article:${articleList}">
            <article class="am-g blog-entry-article">

                <div class="am-u-lg-6 am-u-md-12 am-u-sm-12 blog-entry-text">
                    <!--文章分类-->
                    <span class="blog-color" style="font-size: 15px;"><a>默认分类</a></span>
                    <span>&nbsp;&nbsp;&nbsp;</span>
                    <!--发布时间-->
                    <span style="font-size: 15px;" th:text="'发布于 '+ ${#dates.format(article.created,'yyyy-MM-dd')}"/>
                    <h2>
                        <!--文章标题-->
                        <div>
                            <a style="color: #0f9ae0;font-size: 20px;" th:text="${article.title}"/>
                        </div>
                    </h2>
                    <!--文章内容-->
                    <div style="font-size: 16px;" th:text="${article.content}"/>
                </div>
            </article>
        </div>

        <!--分页-->
        <a class="btn btn-sm" th:href="@{/index(pageNum=0)}">首页</a>
        <a class="btn btn-sm" th:if="${articleList.hasPrevious()}"
           th:href="@{/index(pageNum=${articleList.previousPageable().getPageNumber()})}">上一页</a>
        <a class="btn btn-sm" th:if="${articleList.hasNext()}"
           th:href="@{/index(pageNum=${articleList.nextPageable().getPageNumber()})}">下一页</a>
        <a class="btn btn-sm" th:href="@{/index(pageNum=${articleList.getTotalPages() - 1})}">尾页</a>
    </div>
    <!--博主信息描述-->
    <div class="am-u-md-4 am-u-sm-12 blog-sidebar">
        <div class="blog-sidebar-widget blog-bor">
            <h2 class="blog-text-center blog-title"><span>大锤</span></h2>
            <img th:src="@{/assets/img/me.jpg}" alt="about me" class="blog-entry-img"/>
            <p>
                Java后台开发
            </p>
            <p>个人博客小站，主要发表关于Java、Spring、Docker等相关文章</p>
        </div>
        <div class="blog-sidebar-widget blog-bor">
            <h2 class="blog-text-center blog-title"><span>联系我</span></h2>
            <p>
                <a><span class="am-icon-github am-icon-fw blog-icon"></span></a>
                <a><span class="am-icon-weibo am-icon-fw blog-icon"></span></a>
            </p>
        </div>
    </div>

</div>
</body>
<!--文章尾部-->
<div th:replace="footer::footer"/>
</html>
